﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 人类_学生_教师类创建
{
    internal class Teacher : Person
    {
        protected double Salary {  get; set; }
        
        public Teacher(string name, double salary) : base(name)
        {
            Salary = salary;
        }

        public void Teach()
        {
            Console.WriteLine($"{Name}正在上课，收入为: {Salary}");
        }
    }
}
